package org.yierge.crm.ssm.plus.account.dao.repository.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.yierge.crm.ssm.plus.account.dao.mapper.UserMapper;
import org.yierge.crm.ssm.plus.account.dao.repository.UserRepository;
import org.yierge.crm.ssm.plus.account.pojo.vo.UserLoginInfoVO;

@Slf4j
@Repository(value = "account_userRepositoryImpl")
public class UserRepositoryImpl implements UserRepository {

    @Autowired
    @Qualifier(value = "account_userMapper")
    private UserMapper userMapper;

    public UserRepositoryImpl() {
        log.info("创建存储库对象：UserRepositoryImpl");
    }


    @Override
    public UserLoginInfoVO getLoginInfoByUsername(String username) {
        log.debug("开始执行【根据用户名查询用户登录信息】的数据访问，参数：{}", username);
        return userMapper.getLoginInfoByUsername(username);
    }
}
